package org.gd.hellojaxb.example.map;

import org.gd.hellojaxb.utils.Timer;

import java.util.HashMap;
import java.util.Map;

public class Main {

    public static void main(String...args) {
        Timer.start();
        try {
            Map<Object, Object> map = new HashMap<Object, Object>();
            map.put("1", "1");
            map.put("2", "2");
            map.put("3", "2");
            map.put("4", 2);

            XmlStringMap xmlMap = new XmlStringMap(map);

            System.out.println(xmlMap.toString());

            /*System.out.println(Marshall.marshal(xmlMap,
                    Marshaller.JAXB_FRAGMENT,
                    Marshaller.JAXB_FORMATTED_OUTPUT));*/

        } catch (Throwable e) {
            e.printStackTrace(System.err);
        }
        Timer.stop();
        System.exit(0);
    }
}
